﻿Chenxin.UI.ChangeLogManage = Chenxin.extend(Chenxin.UI.PageCommon, {
    autoInitForm: false,
    actionUrl: 'service/ChangeLogHandler.ashx',
    createGrid: function() {
		return new Chenxin.UI.ExpandGrid({
			actionUrl: this.actionUrl + '?op=getlist',
			renderTo:'marked_table',
			id:'marked',
			hasCheckBox:false,
			columns:{				
				//HouseCode:{
				//	head:"房源编号",
				//	width:160,
				//	sortable:true
				//},
				HouseAddress:{
					head:"地址",
					width:240,
					sortable:true
				},
				ChangTime:{
					head:"变更时间",
					width:120,
					sortable:true
				},
				Operater:{
					head:"变更人",
					width:80,
					sortable:true
				},
				SourceState:{
					head:"原状态",
					width:50,
					sortable:true
				},
				TargetState:{
					head:"现状态",
					width:50,
					sortable:true
				},
				OprType:{
					head:"操作类别",
					width:80,
					sortable:true
				},
				OprPerson:{
					head:"房源所属人",
					width:80,
					sortable:true
				},
				OprDepart:{
					head:"房源所属部门",
					width:80,
					sortField:"MarkPersonID",
					sortable:true
				}
			}
		})
    },
    cancle: function() {
    },
    createSearch: function() {
        return new Chenxin.UI.ChangeLogSearch({
            scope: this
        });
    },
    initComponent: function() {
        Chenxin.UI.ChangeLogManage.superclass.initComponent.call(this);
    }
});


/**
*查询面板
*/
Chenxin.UI.ChangeLogSearch = Chenxin.extend(Chenxin.UI.SearchCommon, {
    id: 'ChangeLog_search',
    initEvent: function() {
        var _this = this;
        $('#btn_search').click(function() {
            _this.scope.reloadGrid();
        });
    },
    createComboList: function() {
        var combl = new Chenxin.UI.StructComboList();
        var structs = combl.comboList;
		var comstate = new Chenxin.UI.Combo({
            containerId: '#state',
			name:'state',
            inModelType: 'val',
			tbxWidth: 60,
            items: comboCommon.UpdateObj
        });
		var targetState = new Chenxin.UI.Combo({
            containerId: '#targetState',
			name:'targetState',
            inModelType: 'val',
			tbxWidth: 60,
            items: comboCommon.houseStatus1
        });
		structs.push(targetState);
		structs.push(comstate);
        return structs;
    },
    initComponent: function() {
        Chenxin.UI.ChangeLogSearch.superclass.initComponent.call(this);
    }
});

$(document).ready(function() {
    var markedMgr = new Chenxin.UI.ChangeLogManage();
});